UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qXrdW4df/6kAc4edSYx1U9P23Yyv5312pdOWIlTAgAI='
WHERE
key_id = '01cb5a2acf1feea3c045cf75a36c30abfe73461a4b3cb5791d951502097cdd53'
AND (
token = 'qXrdW4df/6kAc4edSYx1U9P23Yyv5312pdOWIlTAgAI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)