UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'igdZBWmGfYlt/VqR9iTns0d1NwP6Q579d04LV4BWqQs='
WHERE
key_id = '1f9e131c273a366186e8962cec8bb59d6194b1960a5d7f82bba36ecb219058b8'
AND (
token = 'igdZBWmGfYlt/VqR9iTns0d1NwP6Q579d04LV4BWqQs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)