UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Oobyws5NOw8ZmqbWDGTZLa3aedTD3vGZ0iJJLFJ/9UM='
WHERE
key_id = '48c8feaeba3aa33dcaa7cd5a6effe93f72a9d9f54c8442abb9849be1a51c9370'
AND (
token = 'Oobyws5NOw8ZmqbWDGTZLa3aedTD3vGZ0iJJLFJ/9UM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)