UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vLuid1Goz9/8vuMXu+Mr0LWAHjompjGbMkOIzpACs/E='
WHERE
key_id = '68a43fa9bba9b587d054e80e97ccda317175b35084165747f2cfb9748a5aa7c3'
AND (
token = 'vLuid1Goz9/8vuMXu+Mr0LWAHjompjGbMkOIzpACs/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)