UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iCxIwNa6s2iskSEAzAOjoDIbfdAuQZ7L/QSBZn/5AeE='
WHERE
key_id = 'fa6702b0e16c616f639755fade4654ad6c6c7233aff4782f73846bb73989731c'
AND (
token = 'iCxIwNa6s2iskSEAzAOjoDIbfdAuQZ7L/QSBZn/5AeE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)