UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OrQuMFJxQkPD2Tmr1/xYETvoMRm4bAMJLiGKNEmQcR8='
WHERE
key_id = '75b937c9d5b1b7dd2ad0abc6f79f8daedfa403876851ec9bbc3a9fa900bdecd5'
AND (
token = 'OrQuMFJxQkPD2Tmr1/xYETvoMRm4bAMJLiGKNEmQcR8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)