UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RIiUtbgve/fPnIeh7IQaQVEgSmtObyiQkowx2VLzHm0='
WHERE
key_id = 'b0c11dc2aefa0832d7a81a86dcf7b9c06986c49e6d260ddda896a6d1ec60ce7d'
AND (
token = 'RIiUtbgve/fPnIeh7IQaQVEgSmtObyiQkowx2VLzHm0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)