UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iijCVCgDu4nHsePZI4dpUTGxLSuh/RNfi95t/KVdUJg='
WHERE
key_id = '60362c219075c007afe6258a282d8da9bd2c186a680e920e3402b12c26eb3129'
AND (
token = 'iijCVCgDu4nHsePZI4dpUTGxLSuh/RNfi95t/KVdUJg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)