UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PaNgTrPycjhzMZHYuwyCAqDHhBnxEYRIPgi+LoJU3IE='
WHERE
key_id = '7151ed5925a62007cc48ce134e12fff2575ece77cacb371c1d44c398a250e55f'
AND (
token = 'PaNgTrPycjhzMZHYuwyCAqDHhBnxEYRIPgi+LoJU3IE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)