UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'urQmpcPgcaacqrOKCV3qk9HzTMjctgsrGL/opp0/C5Q='
WHERE
key_id = 'b8a66f3fd07664b0f2b3b7f31c0421607232642420dbc68272d1356cf4eadc37'
AND (
token = 'urQmpcPgcaacqrOKCV3qk9HzTMjctgsrGL/opp0/C5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)