UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZbVE1fyVbRSHyNOK0i4/G8S2LnaTvN6Fowd8XKUrUyc='
WHERE
key_id = 'bd48ee73c36a2527c6417713932965005674195a877ce3f8a242b7d9a3ec055c'
AND (
token = 'ZbVE1fyVbRSHyNOK0i4/G8S2LnaTvN6Fowd8XKUrUyc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)