UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'q98eqKzovdsmGvkM+p5zJ3t1j9QF7M76Uz1I0IO88kQ=' 
WHERE 
  key_id = 'cdfe301f4ebb9fdbc8c85c676e2de398aed03011b0e04f837dd8345a53777d7b' 
  AND (
    token = 'q98eqKzovdsmGvkM+p5zJ3t1j9QF7M76Uz1I0IO88kQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00074