UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VK/uRL5YHYX/VrnRUQTwMjXsat73EfLhyw2WEBd9QqM='
WHERE
key_id = '158a666beed904e4cd5eddaf851063d257490874a0116bd664025ffe71b168fc'
AND (
token = 'VK/uRL5YHYX/VrnRUQTwMjXsat73EfLhyw2WEBd9QqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)