UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WLMJ0/524Jv/b3ytgeU4WPO27Eci/VxbbGACoofNSsk='
WHERE
key_id = '20b30acc3e827aaf8e3709417a95a6e5afbad7a517cd5c99c966ba8f5628ad01'
AND (
token = 'WLMJ0/524Jv/b3ytgeU4WPO27Eci/VxbbGACoofNSsk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)