UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M22PXf9Txb7hNIUoIvz/N3Z0KMcVd3/jCLLZrBpQuPo='
WHERE
key_id = '13708d1ca0ce8e45902c6d3fe49e76fd75effbefe79bf5172439fb25cf68bfdd'
AND (
token = 'M22PXf9Txb7hNIUoIvz/N3Z0KMcVd3/jCLLZrBpQuPo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)