UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DrDb4tzqH7l+qlhrIWz6CoU9/pK6yLEo6+JiPy0Q1PQ='
WHERE
key_id = '69907cc1aed0af3e9744fdf05e7faf99bb1eaaa2d48213011fc69e49e280a3a7'
AND (
token = 'DrDb4tzqH7l+qlhrIWz6CoU9/pK6yLEo6+JiPy0Q1PQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)