UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KVI1ULEjK9UarUFxKWBCHbZt05tb/LACJN7KraZ5iyc='
WHERE
key_id = '2157002d16d1a8be89fc41fac0917297b77b42ff3751303e212be97fd34ea61f'
AND (
token = 'KVI1ULEjK9UarUFxKWBCHbZt05tb/LACJN7KraZ5iyc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)