UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E4fXfZ+O5n+Lmxlusvb5wI7q0yX1IGdv5NpZyAFDHHA='
WHERE
key_id = '94adb826a9fa9e76c9499e05cf352b109e81c03b66ec9f9923071978b7b06fb1'
AND (
token = 'E4fXfZ+O5n+Lmxlusvb5wI7q0yX1IGdv5NpZyAFDHHA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)