UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+WizmGjF4q6aUkxJHx8JASTqqoa33gKqcUDgQbqSeJo=' 
WHERE 
  key_id = '8cfba960031254bad7043d8515a7a0b82883ff4c98430d7828e540ad1f06aebe' 
  AND (
    token = '+WizmGjF4q6aUkxJHx8JASTqqoa33gKqcUDgQbqSeJo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034