UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IL7C7ujPYj47uvGbOdn6TdcrtstO/9glkvDb1gv5N+A='
WHERE
key_id = '98f7e5f2c4785e93e3886a935dd53e22e27ae1653f8b101854031aa84560ddce'
AND (
token = 'IL7C7ujPYj47uvGbOdn6TdcrtstO/9glkvDb1gv5N+A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)