UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FzRGhPJ3pzIn5OT71O5SimOmlQGC4TenaiMCpja0gmM=' 
WHERE 
  key_id = 'b01576fad7c4457d597888d63237a2408dab01e54931bcc0b21b22f9b85cae93' 
  AND (
    token = 'FzRGhPJ3pzIn5OT71O5SimOmlQGC4TenaiMCpja0gmM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050