UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vV5i/uyCWxv8QI0M7+/vBmMiVriys58lFxrsEIV9XXg='
WHERE
key_id = 'c359449c30707d90551a34d5d59bc8451400b97340c53ad7449aefc4fe29ecb8'
AND (
token = 'vV5i/uyCWxv8QI0M7+/vBmMiVriys58lFxrsEIV9XXg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)