UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '89t75TdcqkkQjmB3ADdCR8lynw/kSQk4TtFFyVERmhA='
WHERE
key_id = '81c7b653db6731d9548f109d4dce9f5a62de8c37f701ffc38ba296045d611bcf'
AND (
token = '89t75TdcqkkQjmB3ADdCR8lynw/kSQk4TtFFyVERmhA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)