UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uV6JgRjZbDfJb5oHBI/b+LxmwJaPsyXKneEgmoyn7tg=' 
WHERE 
  key_id = '1bb53cdc7a1980bfb8d49208f246074aa955d688917de07a95e14fcc7b2ffc89' 
  AND (
    token = 'uV6JgRjZbDfJb5oHBI/b+LxmwJaPsyXKneEgmoyn7tg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031