UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/lfGbkTu+wPoYQnfc7W/E7NgW7/dfoF3Z4bRUKLAwuA='
WHERE
key_id = 'a53bac6214f1c74ad12453ed2ec0ade9182f5de02ddb044f89910d3fd747d639'
AND (
token = '/lfGbkTu+wPoYQnfc7W/E7NgW7/dfoF3Z4bRUKLAwuA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)