UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PydROefxu6+wcuNG+YNvc+n+nL+/MgPHi1Znbbmwdw0='
WHERE
key_id = '06b3b1e87dcabb2b7ff0de23789ec0d0ad6a6900d899114db88e722f4d10aedd'
AND (
token = 'PydROefxu6+wcuNG+YNvc+n+nL+/MgPHi1Znbbmwdw0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)