UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '69E2tHyMm0Bs3m64EofR9c0FrUKRSkjlelsGCn/lreo=' 
WHERE 
  key_id = '7e22fab9cf6c6c1076e60ae63e8322d92d3bf1ea73fcad9928af2478ea8b5895' 
  AND (
    token = '69E2tHyMm0Bs3m64EofR9c0FrUKRSkjlelsGCn/lreo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041