UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/5yW1aQ1fyCe/b1dUQjcYBp6Kb6on6nBHVuAb90kWEM='
WHERE
key_id = 'adac8a4b89ad94ca1d6da1aa5ede7b9c7cb75b6a30b878d245b2a1b353b6c708'
AND (
token = '/5yW1aQ1fyCe/b1dUQjcYBp6Kb6on6nBHVuAb90kWEM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)