UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4GieSQOjAjK9HeTFGa1zhjvTIusMIdd6k5vLoNgjPts='
WHERE
key_id = '5a05336befada8a343bc43862673ec05593ecf5b65e850ab033754459e4d9fba'
AND (
token = '4GieSQOjAjK9HeTFGa1zhjvTIusMIdd6k5vLoNgjPts='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)