UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MbCapgKXhyuZKZ/aZM3Fou83nZp5LTB6LoKxmeOqaK4='
WHERE
key_id = '60329498fd562af7dc419ca79401c2750a2404e8b992aa29d83d9f7b1e623957'
AND (
token = 'MbCapgKXhyuZKZ/aZM3Fou83nZp5LTB6LoKxmeOqaK4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)