UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WQ1Uf8MGO2KkCNk065WZM/owrke/Zew+oegubW5WeTc='
WHERE
key_id = '9bc7f90d8c75f1098cd741b4ea5579d4d3f7241067ca11ea02040bf1c2dd916a'
AND (
token = 'WQ1Uf8MGO2KkCNk065WZM/owrke/Zew+oegubW5WeTc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)