UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+zNYU/0DFm8Hf1NeQMb8Ntg91rBhciz5eynKvA2QM2U='
WHERE
key_id = '2f85c5c97e56f5c5e64c2452d6375f938ea70df001e9bdcc01fb0777ac59d856'
AND (
token = '+zNYU/0DFm8Hf1NeQMb8Ntg91rBhciz5eynKvA2QM2U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)