UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2XyEP5wy6ZgrtZvvyUWX1O3DlhUBFyVwwypRzBW70co=' 
WHERE 
  key_id = '825127ee61befa3eaff728363fd6e924b21a21f814c0ebe0445608b985840752' 
  AND (
    token = '2XyEP5wy6ZgrtZvvyUWX1O3DlhUBFyVwwypRzBW70co=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048