UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bfKkK9Rz79IpxLpNZWCuB4FWO7irXvWCc5r/TEnFBO8='
WHERE
key_id = '6a4df913f62fd584339b41ed03181c52aad9eb1a12c96cf18439b3636e7fc72f'
AND (
token = 'bfKkK9Rz79IpxLpNZWCuB4FWO7irXvWCc5r/TEnFBO8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)