UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/nGQIIPAguRN2pG8nFJ/DHaDp2y26bHB1ABKOSPHrRc=' 
WHERE 
  key_id = '4e5ea364efd3184bac7b2cb9dc10bccb7da66eb20a8131b88a6af2a8e4bd9615' 
  AND (
    token = '/nGQIIPAguRN2pG8nFJ/DHaDp2y26bHB1ABKOSPHrRc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023