UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SV8ZxIzdR2bnxnOsq1k7iSgS/yZrGqPwuIq6xo2/Lhw='
WHERE
key_id = '37201d6c74460b013a871b7dd0129668b9f23d00bfb0bf2f64bc6d47dfac4c3a'
AND (
token = 'SV8ZxIzdR2bnxnOsq1k7iSgS/yZrGqPwuIq6xo2/Lhw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)