UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lctAszRr7d/Mddy6RB3IRr/YD2IzmvQZPcB4JZN6kzQ='
WHERE
key_id = 'c2b459f08f8da5dfc141b61f728b7a66710ad64aa2c49c7e96a6997b1059caf3'
AND (
token = 'lctAszRr7d/Mddy6RB3IRr/YD2IzmvQZPcB4JZN6kzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)