UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zL+nxFa5f/e64wJoSHEKZthxKsMyxHvpncpNXwP3ZNM='
WHERE
key_id = '90f10d248acde6c06c82f9cc9d50c0a58d1e088b7df9369818308dd868e64a85'
AND (
token = 'zL+nxFa5f/e64wJoSHEKZthxKsMyxHvpncpNXwP3ZNM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)